package com.sevenluo.netty.learn.common.keepalive;

import com.sevenluo.netty.learn.common.Operation;
import com.sevenluo.netty.learn.common.OperationResult;
import lombok.Data;
import lombok.extern.java.Log;

/**
 * @author: 程序员七哥
 * @date: 2022-01-26
 * @description:
 */
@Data
@Log
public class KeepAliveOperation extends Operation {

    private long time;

    public KeepAliveOperation() {
        this.time = System.nanoTime();
    }

    @Override
    public OperationResult execute() {
        KeepAliveOperationResult orderResponse = new KeepAliveOperationResult(time);
        return orderResponse;
    }
}
